package practice.practice_0903;

/**
 * 快递任务类
 */
public class FastMailTest {
    private String trackingNum;//快递单号
    private double weight;//货物重量
    public FastMailTest(){

    }
    public FastMailTest(String trackingNum,double weight){
        this.trackingNum=trackingNum;
        this.weight=weight;
    }

    //送钱准备
    public void before(){
        System.out.println("订单开始处理，仓库验货中。。。");
        System.out.println("货物重量："+weight+"kg");
        System.out.println("货物检验完毕！");
        System.out.println("货物填装完毕！");
        System.out.println("运货人已通知！");
        System.out.println("快递单号："+trackingNum);
    }
    //发送货物
    public void conduct(SpecialTransportVehicle stv){
        System.out.println("运货人"+stv.getPrincipal()
                +"正在驾驶编号为"+stv.getNumber()
                +"的"
                +stv.getModel()+"发送货物！");
        stv.transport();
        Phone p=new Phone();
        System.out.println("货物当前的坐标为："+p.showLocation());
    }
    //送后操作
    public void after(SpecialTransportVehicle stv){
        System.out.println("货物运输任务已完成！");
        System.out.println("运货人"+stv.getPrincipal()
                +"所驾驶的编号为"+stv.getNumber()
                +"的"
                +stv.getModel()+"已归还！");
        stv.maintenance();
    }

}
